//
//  WDChangeString.m
//  Zhihuijinfu
//
//  Created by 王笛 on 2017/1/16.
//  Copyright © 2017年 王笛. All rights reserved.
//

#import "WDChangeString.h"

@implementation WDChangeString

+(NSDictionary *)changeStringToDictionary:(NSString *)string
{
    NSMutableDictionary *dic = [NSMutableDictionary dictionary];
    NSArray *array = [string componentsSeparatedByString:@"&"];
    for (NSString *str in array) {
        NSArray *tempArray = [str componentsSeparatedByString:@"="];
        [dic setObject:tempArray[1] forKey:tempArray[0]];
    }
    return dic;
    
}

@end
